package com.crm.crm.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.crm.crm.domain.Clue;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface ClueMapper extends BaseMapper<Clue> {
    @Update("update clue set status = #{status} where id = #{id}")
    void addRecord(String status,Integer id);
    String findUserId(Integer userId);

    void setOwner(List<Integer> ids, String owner);

    void updateClue(Clue clue);
    @Select("select count(*) from clue where owner = #{userName} ")
    Long selectClueNum(String userName);
    @Select("select count(*) from clue_pool where owner = #{userName} ")
    Long selectCluePoolNum(String userName);
    @Select("select id from clue where name = #{name}")
    List<Integer> selectIds(String name);
}
